package com.byedu.domain.course.vo;

import com.byedu.domain.course.QuestionDO;
import com.byedu.domain.course.vo.enumvos.QuestionTypeVO;

import java.io.Serializable;
import java.util.List;

/**
 * Created by weidangwang on 2017/3/6.
 */
public class QuestionVO implements Serializable{
	
	private static final long serialVersionUID = 3240440230464557425L;

	/*考题编号*/
    private int id;
    /*序号*/
    private int no;
    /*考题解析*/
    private String analysis;
    /*考题内容*/
    private String content;
    /*考题类型*/
    private String ctype;

    private List<AnswerVO> answers;

    /*我的回答*/
    private String myanswer;

    /*该题的正确选项*/
    private String right;

    /*用户是否回答了该题*/
    private boolean status;

    /*用户的选项*/
    private String a = "";

    public boolean isAr() {
        return ar;
    }

    public void setAr(boolean ar) {
        this.ar = ar;
    }

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }

    /*用户是否答对*/
    private boolean  ar;

    public QuestionVO (){}

    public QuestionVO(QuestionDO questionDO, List<AnswerVO> answers) {
        this.id = questionDO.getId();
        this.no = questionDO.getNo();
        this.analysis = questionDO.getAnalysis();
        this.content = questionDO.getContent();

        this.ctype = new QuestionTypeVO(questionDO.getCtype()).getTitle();

        this.answers = answers;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public List<AnswerVO> getAnswers() {
        return answers;
    }

    public void setAnswers(List<AnswerVO> answers) {
        this.answers = answers;
    }

    public String getMyanswer() {
        return myanswer;
    }

    public void setMyanswer(String myanswer) {
        this.myanswer = myanswer;
    }

    public String getCtype() {
        return ctype;
    }

    public void setCtype(String ctype) {
        this.ctype = ctype;
    }

    public String getRight() {
        return right;
    }

    public void setRight(String right) {
        this.right = right;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }
}
